/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package MODEL.DBCONNECT;

import java.sql.Connection;
import java.sql.DriverManager;

/**
 *
 * @author khanh huynh, le cang
 */
public class CONNECT {
     public static Connection getConnection() throws Exception {
        String DBDriver = "net.sourceforge.jtds.jdbc.Driver";
        String url = "jdbc:jtds:sqlserver://127.0.0.1;DatabaseName=JAVANC_BANMAYTINH";
        Class.forName(DBDriver);
        Connection con = DriverManager.getConnection(url, "sa", "123456");
        return con;
    }
}
